package com.jungle.app.repository;


import com.jungle.common.core.domain.entity.MyUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface UserLoginRepository extends JpaRepository<MyUser, String>, JpaSpecificationExecutor<MyUser> {


    MyUser findByPhoneNumber(String phoneNumber);

    MyUser findByOpenid(String openid);

    @Query("select count(*) as count from MyUser where openid is not null ")
    Long countByWx();

}
